#include "Mainwindow.h"
#include "ui_mainwindow.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);
    //菜单栏
    QMenuBar* menuBar=new QMenuBar;
    this->setMenuBar(menuBar);//设置菜单栏
    QMenu* act=menuBar->addMenu("文件");
    act->addAction("打开");
    act->addAction("新建");

}

MainWindow::~MainWindow()
{
    delete ui;
}
